/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LIUYANJIAO
 * Date: 2024-06-03
 * Time: 17:37
 */
public class Main {
    public int[] twoSum(int[] nums, int target) {
        int[]arr=new int[2];
        for (int i = 0; i < nums.length; i++) {
            for(int j=i;j<nums.length;j++){
                if(nums[i]+nums[j]==target){
                   arr[0]=i;
                   arr[1]=j;
                   return arr;
                }
            }
        }return arr;
    }
    public static void main(String[] args) {

    }
}